package Jieyekaoshi;

import java.rmi.dgc.Lease;
import java.text.SimpleDateFormat;
import java.time.LocalDateTime;
import java.util.Date;
import java.util.Scanner;

public class While {
    public static void main(String[] args) {
        while (true) {
            System.out.println("请输入内容（按n退出循环）：");
            Scanner sc = new Scanner(System.in);
            String info = sc.next();
            //如果是n
            if (info.equals("n")) {
                //退出循环
                break;
            }else {
                LocalDateTime now = LocalDateTime.now();
                System.out.println(now);
            }


        }
    }
}
